import {take,call,put,fork} from 'redux-saga/effects';
import getGoodsCommodityEval from '../servers/serGoodsCommodityEval';
function * sagGoodsCommodityEval() {
    while (true) {
        let action = yield take('COMMODITYEVAL');
        let payload = yield call(getGoodsCommodityEval, action.data.temGid);
        if (payload.code === 200) {
            yield put({type: 'commodityeval',data: {aEvaArrt: payload}})
            if (action.data.success) {
                action.data.success(payload);
            }

        }
    }
}

export default[
    fork(sagGoodsCommodityEval)
]